import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
   redirect: '/login' ,
    children:[
      {
        path: '/goodsShow',
        name: 'GoodsShow',
        component:() => import("@/views/clerk/GoodsShow"),
        meta:{
          //
          title: '店员页面'
        }
      },
      {
        path: '/user',
        name: 'User',
        component:() => import("@/views/sysuser/User"),
        meta:{
          //
          title: '系统管理员页面'
        }
      },


      {
        path: '/person',
        name: 'Person',
        component: () => import("@/views/Person"),
        meta:{
          //
          title: '个人信息'
        }
      },
      {
        path: '/goodsManage',
        name: 'GoodsManage',
        component: () => import("@/views/shopowner/GoodsManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/todayOrder',
        name: 'TodayOrder',
        component: () => import("@/views/shopowner/TodayOrder"),
        meta:{
          //
          title: '店长管理页面'
        }
      },

      {
        path: '/seatManage_available',
        name: 'SeatManage_available',
        component: () => import("@/views/shopowner/SeatManage_available"),
        meta:{
          //
          title: '店长管理页面'
        }
      }
      ,
      {
        path: '/seatManage_using',
        name: 'SeatManage_using',
        component: () => import("@/views/shopowner/SeatManage_using"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/seatManage_cleaning',
        name: 'SeatManage_cleaning',
        component: () => import("@/views/shopowner/SeatManage_cleaning"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/meal_details',
        name: 'Meal_details',
        component: () => import("@/views/shopowner/Meal_details"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/meal_situation',
        name: 'Meal_situation',
        component: () => import("@/views/shopowner/Meal_situation"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/showOrder_Running',
        name: 'ShowOrder_Running',
        component: () => import("@/views/shopowner/ShowOrder_Running"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/wineTypeManage',
        name: 'WineTypeManage',
        component: () => import("@/views/shopowner/WineTypeManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      },{
        path: '/wineManage',
        name: 'WineManage',
        component: () => import("@/views/shopowner/WineManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      },{
        path: '/temporaryManage',
        name: 'TemporaryManage',
        component: () => import("@/views/shopowner/TemporaryManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      }
      ,{
        path: '/wineStockManage',
        name: 'WineStockManage',
        component: () => import("@/views/shopowner/WineStockManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/seatManage',
        name: 'SeatManage',
        component:() => import("@/views/shopowner/SeatManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/checkPlenishment',
        name: 'CheckPlenishment',
        component:() => import("@/views/shopowner/CheckPlenishment"),
        meta:{
          //
          title: '店长管理页面'
        }
      },

      {
        path: '/statistics',
        name: 'Statistics',
        component: () => import("@/views/shopowner/Statistics"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/statistics1',
        name: 'Statistics1',
        component: () => import("@/views/shopowner/Statistics1"),
        meta:{
          //
          title: '店长管理页面'
        }
        },
      {
        path: '/goodsTypeManage',
        name: 'GoodsTypeManage',
        component: () => import("@/views/shopowner/GoodsTypeManage"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/statistics2',
        name: 'Statistics2',
        component: () => import("@/views/shopowner/Statistics2"),
        meta:{
          //
          title: '店长管理页面'
        }
      },
      {
        path: '/replenishment',
        name: 'Replenishment',
        component: () => import("@/views/cooks/Replenishment"),
        meta:{
          //
          title: '厨师页面'
        }
      },
      {
        path: '/orderProcessing',
        name: 'OrderProcessing',
        component: () => import("@/views/cooks/OrderProcessing"),
        meta:{
          //
          title: '厨师页面'
        }
      },
      {
        path: '/showOrder',
        name: 'ShowOrder',
        component: () => import("@/views/clerk/ShowOrder"),
        meta:{
          //
          title: '店员页面'
        }
      },


      {
        path: '/seatManage_available_clerk',
        name: 'SeatManage_available_clerk',
        component: () => import("@/views/clerk/SeatManage_available_clerk"),
        meta:{
          //
          title: '店员管理页面'
        }
      },
      {
        path: '/showOrder1',
        name: 'ShowOrder1',
        component: () => import("@/views/clerk/ShowOrder1"),
        meta:{
          //
          title: '店员页面'
        }
      },
      {
        path: '/showOrder2',
        name: 'ShowOrder2',
        component: () => import("@/views/clerk/ShowOrder2"),
        meta:{
          //
          title: '店员页面'
        }
      },

      {
        path: '/callNumber',
        name: 'CallNumber',
        component: () => import("@/views/clerk/CallNumber"),
        meta:{
          //
          title: '店员页面'
        }
      },{
        path: '/showSeat_available_clerk',
        name: 'ShowSeat_available_clerk',
        component: () => import("@/views/clerk/ShowSeat_available_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      },{
        path: '/showSeat_need_clean_clerk',
        name: 'ShowSeat_need_clean_clerk',
        component: () => import("@/views/clerk/ShowSeat_need_clean_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      },
      {
        path: '/showSeat_cleaning_clerk',
        name: 'ShowSeat_cleaning_clerk',
        component: () => import("@/views/clerk/ShowSeat_cleaning_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      },
      {
        path: '/showSeat_using_clerk',
        name: 'ShowSeat_using_clerk',
        component: () => import("@/views/clerk/ShowSeat_using_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      }
      ,
      {
        path: '/callNumber_finish',
        name: 'CallNumber_finish',
        component: () => import("@/views/clerk/CallNumber_finish"),
        meta:{
          //
          title: '店员页面'
        }
      }
      ,
      {
        path: '/wine_situation_clerk',
        name: 'Wine_situation_clerk',
        component: () => import("@/views/clerk/Wine_situation_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      }
      ,
      {
        path: '/wine_details_clerk',
        name: 'Wine_details_clerk',
        component: () => import("@/views/clerk/Wine_details_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      }
      ,
      {
        path: '/meal_situation_clerk',
        name: 'Meal_situation_clerk',
        component: () => import("@/views/clerk/Meal_situation_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      },
      {
        path: '/meal_details_clerk',
        name: 'Meal_details_clerk',
        component: () => import("@/views/clerk/Meal_details_clerk"),
        meta:{
          //
          title: '店员页面'
        }
      },
      {
        path: '/toClean',
        name: 'ToClean',
        component: () => import("@/views/cleaner/ToClean"),
        meta:{
          //
          title: '保洁员页面'
        }
      },{
        path: '/replenishmentCleaner',
        name: 'ReplenishmentCleaner',
        component: () => import("@/views/cleaner/ReplenishmentCleaner"),
        meta:{
          //
          title: '保洁员页面'
        }
      },

    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import("@/views/Login"),
    meta:{
      //
      title: '欢迎登录'
    }
  },

  {
    path: '/register',
    name: 'Register',
    component: () => import("@/views/Register")
  },
   {
    path: '/test',
    name: 'Test',
    component:() => import("@/views/cleaner/Test"),
  },


]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
